Skip to content

fix #300#313

Merged
davideschiavone merged 2 commits intoopenhwgroup:mainfrom
davideschiavone:fix300
Feb 23, 2026
Merged

fix #300#313
davideschiavone merged 2 commits intoopenhwgroup:mainfrom
davideschiavone:fix300

Conversation

@davideschiavone
Copy link
Copy Markdown

@davideschiavone davideschiavone commented Feb 14, 2026

It is expected to break when Xinterface is active

rf_we_raw = rf_we_dec & ex_valid_i;
end

if (illegal_insn_dec && XInterface) begin
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will work in simulation. Will synthesis produce the expected results?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should yes - but we should try with some real co-processor

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not worried about the case when there is a module connected to the XIF and the parameter XInterface is set to 1. That will work as expected in both simulation and synthesis. What is less clear is what will be produced in synthesis when XInterface is 0.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, coproc_done will always be 1 as its default value is set here

and it could go to zero only if this statement is true.
This can never be as the XInterface parameter would be 0 at design time - so the synthesizer would simply remove this logic, and there should not be any latch inferred.

Similarly, as this if statement would always be 0 , the coproc_done value here would never be assigned, so it would keep its default value at 1 - if you prefer for readability, I can do else coproc_done = 1'b1 - that's why when XInterface is 0 the CPU is Sequentially Equivalent.

If instead you refer to the situation that there is an illegal instruction and you are in the MULTI_CYCLE state, then no worries, you can never be here as you would never been entered this state if illegals and XInterace is 0. That's why when XInterface is 0 the CPU is Sequentially Equivalent.

@davideschiavone davideschiavone merged commit 7c05fc5 into openhwgroup:main Feb 23, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] RF write enable is driven by issue interface instead of the result interface

2 participants